package org.mx.mycrm.service.base;

import java.util.LinkedHashMap;

import org.mx.mycrm.beans.page.QueryResult;

public interface BaseDAO {
	public void save(Object entity);
	public void update(Object entity);
	public <T> void delete(Class<T> entityClass,Object entityid);
	public <T> void delete(Class<T> entityClass,Object[] entityids);
	public <T> T find(Class<T> entityClass,Object entityId);
	public <T> QueryResult<T> getScrollData(Class<T> entityClass);
	public <T> QueryResult<T> getScrollData(Class<T> entityClass, int firstindex,int maxresult);
	public <T> QueryResult<T> getScrollData(Class<T> entityClass, int firstindex,int maxresult,String wherejpql,Object[] queryParams);
	public <T> QueryResult<T> getScrollData(Class<T> entityClass, int firstindex,int maxresult,LinkedHashMap<String, String> orderby);
	public <T> QueryResult<T> getScrollData(Class<T> entityClass, int firstindex,int maxresult,String wherejpql,Object[] queryParams,LinkedHashMap<String, String> orderby);
}
